package com.changgou.goods.dao;

import com.changgou.goods.pojo.Para;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface ParaMapper extends Mapper<Para> {
    /**
     * 根据分类查询参数
     * @param categoryName
     * @return
     */
    @Select("select s.name,s.options from tb_para s where s.template_id in(SELECT c.template_id from tb_category c WHERE c.`name`=#{categoryName} )")
    List<Map> findSpecByCategory(String categoryName);
}
